package com.sdry.untils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @author tdd
 * @version V1.0
 * @ClassName: UrlUtil
 * @Description:
 * @date 2020/4/1 18:01
 */
@Configuration
public class UrlUtil {
    //上传路径
    public final static String UPLODE_FILE = System.getProperty("user.dir") + "/src/main/resources/static/excel/data/";
    //word模板所在路径
    public final static String WORD_TEMPLATE_URL = System.getProperty("user.dir") + "/src/main/resources/static/word/";
    //生成word文件路径
    public static String WORD_FILE_URL;
    //访问生成word文件的路径
    public final static String XM_WORD_FILE_URL ="/word/";
    //注入生成word文件路径
    @Autowired(required = false)
    public void setUploadPath(@Value("${file.WORD_FILE_URL}")String WORD_FILE_URL) {
        UrlUtil.WORD_FILE_URL = WORD_FILE_URL;
    }
}
